// KWIOLib.cpp native assembly code template.
// KW-Software embedded CLR native assembly builder tool generated source file.
// use this file to implement your own native code

#include "eclr.h"
#include "KWIOLib.h"


bool KWIOLib::init()
{
// if necessary, insert some initialization code for the KWIOLib library here !
// call KWIOLib::init() somewhere before KWIOLib::loadLibrary() is called.
// loadLibrary() have to be called after the ClrContoller object is instanciated
// for detailed information see the native library builder documentation
    return true;
}

bool KWIOLib::isCompatible(const EclrVersion& requestedVersion)
{
// this function is called by the runtime if an application will be bound
// to this library with the requested version.
// return true means that this library fits to the requested interface.
// return false forces the runtime to search for other libraries with the same name by calling isCompatible()
// if no libraries could be found, the runtime breaks the loading process with linker-error
// for multiple library version support read the documentation.
    return true;
}

bool KWIOLib::load(ClrAppDomain* pAppDomain)
{
// This function is called by the runtime if an application will be started.
// pAppDomain is the domain object witch hosts the current application process.
// At this point, the firmware library is able to initialize some internal objects.
// If the initialization is done ok, return true
// othewise return false.
    return true;
}

bool KWIOLib::unload(ClrAppDomain* pAppDomain)
{
// This function is called by the runtime if an application will be terminated.
// pAppDomain is the domain object witch hosts the current application process.
// At this point, the firmware library is able to finalize some internal objects.
// If the finalization is done ok, return true
// othewise return false.
    return true;
}

// class MyLib.KWIODriver implementation
KWIOLib::KWIODriver::KWIODriver()
{
// implement your constructor code here !
}

void __PInvoke__ KWIOLib::KWIODriver::ctor()
{
// automatically generated auxiliary contructor : calls the contructor by displacement new operator !
// @Begin automatically generated code, do not modify !
    new (this) KWIOLib::KWIODriver();
// @End automatically generated code
}

void __PInvoke__ KWIOLib::KWIODriver::Init(SZArray* p0, SZArray* p1)
{
debugout("init");
// implement your code here !

}

void __PInvoke__ KWIOLib::KWIODriver::Open()
{
debugout("Open");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::Close()
{
debugout("Close");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::BeginReadAll()
{
debugout("BeginReadAll");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::BeginReadGroup(Int32 p0)
{
debugout("BeginReadGroup");
// implement your code here !
}

SByte __PInvoke__ KWIOLib::KWIODriver::ReadSByte(Int32 p0)
{
debugout("ReadSByte");
// implement your code here !
    return 0;
}

Int16 __PInvoke__ KWIOLib::KWIODriver::ReadInt16(Int32 p0)
{
debugout("ReadInt16");
// implement your code here !
    return 0;
}

Int32 __PInvoke__ KWIOLib::KWIODriver::ReadInt32(Int32 p0)
{
debugout("ReadInt32");
// implement your code here !
    return 0;
}


Byte __PInvoke__ KWIOLib::KWIODriver::ReadByte(Int32 p0)
{
debugout("ReadByte");
	
}

UInt16 __PInvoke__ KWIOLib::KWIODriver::ReadUInt16(Int32 p0)
{
debugout("ReadUInt16");
// implement your code here !
    return 0;
}

UInt32 __PInvoke__ KWIOLib::KWIODriver::ReadUInt32(Int32 p0)
{
debugout("ReadUInt32");
// implement your code here !
    return 0;
}

UInt32 __PInvoke__ KWIOLib::KWIODriver::ReadSingle(Int32 p0)
{
debugout("ReadSingle");
// implement your code here !
    return 0;
}

UInt64 __PInvoke__ KWIOLib::KWIODriver::ReadDouble(Int32 p0)
{
debugout("ReadDouble");
// implement your code here !
    return 0;
}

void __PInvoke__ KWIOLib::KWIODriver::ReadByteBuffer(Int32 p0, Byte* p1, Int32 p2)
{
debugout("ReadByteBuffer");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::EndReadGroup()
{
debugout("EndReadGroup");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::EndReadAll()
{
debugout("EndReadAll");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::BeginWriteAll()
{
debugout("BeginWriteAll");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::BeginWriteGroup(Int32 p0)
{
debugout("BeginWriteGroup");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteSByte(Int32 p0, SByte p1)
{
debugout("WriteSByte");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteInt16(Int32 p0, Int16 p1)
{
debugout("WriteInt16");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteInt32(Int32 p0, Int32 p1)
{
debugout("WriteInt32");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteByte(Int32 p0, Byte p1)
{
debugout("WriteByte");
	
}

void __PInvoke__ KWIOLib::KWIODriver::WriteUInt16(Int32 p0, UInt16 p1)
{
debugout("WriteUInt16");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteUInt32(Int32 p0, UInt32 p1)
{
debugout("WriteUInt32");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteSingle(Int32 p0, UInt32 p1)
{
debugout("WriteSingle");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteDouble(Int32 p0, UInt64 p1)
{
debugout("WriteDouble");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::WriteByteBuffer(Int32 p0, Byte* p1, Int32 p2)
{
debugout("WriteByteBuffer");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::EndWriteGroup()
{
debugout("EndWriteGroup\r\n");
// implement your code here !
}

void __PInvoke__ KWIOLib::KWIODriver::EndWriteAll()
{
debugout("EndWriteAll\r\n");
// implement your code here !
}

